<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@include file="/WEB-INF/page/share/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>52橙子网</title>

<link rel="stylesheet" href="/shop/css/index/index.css" media="all" type="text/css"/>
<link rel="stylesheet" href="/shop/css/global/top.css" media="all" type="text/css"/>
<script language=JavaScript src="/shop/js/xmlhttp.js"></script>
<script language="javascript">
	function validate(){
		var name=document.getElementById("username");
		var password = document.getElementById("password");
		if(name == null || name == ""){
			return ;
		}
		if(password == null || password == ""){
			return ;
		} 
		document.forms[0].submit();
	}

	function toRegUserUI(){
		var form = document.forms[0];
		form.action= "<html:rewrite action='/user/reg' />?method=regUI";
		form.submit();
	}
</script>
</head>
<body>
	<div class="container">
        <%@include file="/WEB-INF/page/share/Head.jsp" %>
        <div class="choose">
        	<div class="choose1">
            	<font>区域:</font><!-- 一级地区 -->
				<c:forEach items="${requestScope.address}" var="addressItem" varStatus="loop"><c:if test="${loop.count == 1}"><c:if test="${empty requestScope.message}">全北京</c:if><c:if test="${!empty requestScope.message}"><a href="<html:rewrite action="/index" />">全北京</a></c:if></c:if><c:if test="${fn:length(addressItem.childs)>0}"><c:if test="${requestScope.selectid != addressItem.addressId}"><a href='<html:rewrite action="/index" />?addressid=${addressItem.addressId}&&selectid=${addressItem.addressId}' >${addressItem.name}</a>&nbsp;&nbsp;</c:if><c:if test="${requestScope.selectid == addressItem.addressId}">${addressItem.name}&nbsp;</c:if></c:if><c:if test="${fn:length(addressItem.childs) == 0}">${addressItem.name}&nbsp;</c:if><c:if test="${loop.count % 20 ==0}"><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if></c:forEach>
                <div class="choose1_right">商圈直达</div>
            </div>
            <!--end choose1-->
            
            <c:if test="${fn:length(requestScope.childAddress)>0}">
	            <div class="choose2">
					<!-- 子级查询 -->
					<c:forEach items="${requestScope.childAddress}" var="child" varStatus="loop"><c:if test="${loop.count ==1}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if><c:if test="${requestScope.selectchildid == child.addressId}">${child.name}&nbsp;</c:if><c:if test="${requestScope.selectchildid != child.addressId}"><a href='<html:rewrite action="/index" />?addressid=${child.addressId}&&parentId=${child.parent.addressId}&&selectchildid=${child.addressId}' >${child.name}</a>&nbsp;</c:if><c:if test="${loop.count % 20 ==0}"><br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</c:if></c:forEach>
	            </div><!--end choose2-->
			</c:if>
        </div><!--end choose-->
		
		<c:if test="${fn:length(requestScope.pageView.records)==0}"><center><font color="red">对不起，没有相关数据!</font></center></c:if>
        <div class="slide">
        	<div class="left_btn"><img src="/shop/image/slide_l.png"/></div>
            <div class="slider">
            	<!-- 商场列表 --><c:forEach items="${requestScope.pageView.records}" var="market" varStatus="loop"><a href='<html:rewrite action="/index/market" />?marketid=${market.id}' title="${market.name}"><img alt="${market.name}" src="/shop${market.image140FullPath }" border=0 /></a><c:if test="${loop.count % 10 ==0}"><br/></c:if></c:forEach></div>
            <div class="right_btn"><img src="/shop/image/slide_r.png"/></div>
        </div><!--end slide-->
        <div class="product">
        	<div class="product_header">
            	<!--<div class="product_header_title"><font>今日特价</font></div>-->
                <div class="product_header_title"><img src="/shop/image/jrtj.png"/></div>
                <div class="product_r"><img src="/shop/image/product_r.png"/></div>
                <div class="product_l"><img src="/shop/image/product_l.png"/></div>
            </div>
            <!--循环中间list部分--><c:set var="begin" value="<div class='product_list'>" /><c:set var="end" value="</div>" />
			<!-- 商品列表开始 --><c:forEach items="${requestScope.productPageView.records}" var="product" varStatus="loop"><c:if test="${loop.count == 1}"><c:out value="${begin}" escapeXml="false" /></c:if><c:if test ="${loop.count != 1}"><c:if test="${loop.count % 5 == 1}"><c:out value="${begin}" escapeXml="false" /></c:if></c:if>
				<div  class="product_list_right">
					<div class="product_list_right_logo">
						<a href="/shop/html/product/${product.type.typeid }/${product.id}.html" target="_blank"><img alt="${product.name }" src='<c:forEach items="${product.styles}" var="pic" varStatus="loop2"><c:if test="${loop2.count == 1 }">/shop${pic.image140FullPath}</c:if></c:forEach>' border=0/></a>
					</div>
					<div class="product_list_right_title">
						<a href='/shop/html/product/${product.type.typeid }/${product.id}.html' target="_blank">${product.name }</a>
					</div>
					${product.parent.name }<a href="/shop/index/market.do?marketid=${product.parent.id }">GO >></a>			
				</div>
				<c:if test="${loop.count % 5 == 0}"><c:if test="${loop.count gt 4}"><c:out value="${end}" escapeXml="false" /></c:if></c:if><c:if test="${loop.count%5!=0}"><c:if test="${loop.count  == requestScope.maxcount}"><c:out value="${end}" escapeXml="false" /></c:if></c:if></c:forEach>
		<!-- 商品列表结束 -->
            <div class="product_footer"></div>
        </div><!--end product-->
        <%@include file="/WEB-INF/page/share/Foot.jsp" %>
        
</div><!--end container-->
<div id="bottom_ad"></div>
<script language="javascript">
	
	var salespromotion = document.getElementById('bottom_ad');		
	if(salespromotion){
		salespromotion.innerHTML= "广告正在加载...";
		send_request(function(value){salespromotion.innerHTML=value},
				 "/shop/index/ad/switch.do?method=getAdd&modulId="+ 1, true);
	}
	
</script>
</body>
</html>
